import requests
req=requests.get('https://www.python.org/')
print(req.status_code)
print(req.encoding)
print(req.text)
print(req.content)

from bs4 import BeautifulSoup
req=requests.get('https://www.python.org/')
req.encoding='utf-8'
soup=BeautifulSoup(req.text,'lxml')
print(soup.title.string)
print(soup.select('head>title')[0].text)